package com.ricchieri.lazymodel;

import org.primefaces.model.ScheduleModel;

import com.ricchieri.common.CustomScheduleEvent;
import com.ricchieri.filter.ScheduleCharterFilter;
import com.ricchieri.service.interf.IScheduleCharterService;

public class TravelStatusScheduleLazyDataModel extends ScheduleLazyModel {
	private static final long serialVersionUID = 7161117855805553052L;

	public TravelStatusScheduleLazyDataModel(
			IScheduleCharterService scheduleCharterService,
			ScheduleCharterFilter scheduleCharterFilter,
			ScheduleModel scheduleModel) {
		super(scheduleCharterService, scheduleCharterFilter, scheduleModel);
		
	}

	@Override
	public String obtainStyle(CustomScheduleEvent customEvent) {
		if(customEvent.getScheduleCharter().getLastTravelUpdate() != null){
			return "old-event";
		}
		
		return "lightblue-event";
	}

}
